<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:set value="recruit" var="moduleName" scope="request" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>材料审核</title>
		<script src="<c:url value="/js/jquery-1.4.4.js" />" type="text/javascript"></script>
	</head>
	<body>
	<div class="div-content">
		<jsp:include page="common-applyBase-view.jsp" />
		<dict:dict type="yesOrNo" var="yesOrNo" />
		<html:form action="/console/recruit/matReviewEx.do" styleId="matReviewForm" method="POST" enctype="multipart/form-data">
			<input type="hidden" name="method" class="method" value="save" />
			<html:hidden property="id" />
			<html:hidden property="applyBaseId" />
			<div class="site-title">
				材料项
			</div>
			<table class="table-layout">
				<tr class="tr-thead" style="background-color:darkgrey;">
					<th style="width:30px;">
						序号
					</th>
					<th>
						材料项
					</th>
					<th style="width:140px">
						确认时间
					</th>
					<th style="width:100px">
						是否收集完成
					</th>
				</tr>
				<tr class="tr-odd">
					<td>
						1
					</td>
					<td>
						斯柯达特许[销售商]入网申请书
					</td>
					<td>
						<html:text property="collectedDate1" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected1" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				<tr class="tr-even">
					<td>
						2
					</td>
					<td>
						组织机构代码证复印件
					</td>
					<td>
						<html:text property="collectedDate2" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected2" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						3
					</td>
					<td>
						营业执照复印件
					</td>
					<td>
						<html:text property="collectedDate3" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected3" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						4
					</td>
					<td>
						税务登记证复印件
					</td>
					<td>
						<html:text property="collectedDate4" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected4" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						5
					</td>
					<td>
						公司章程
					</td>
					<td>
						<html:text property="collectedDate5" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected5" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						6
					</td>
					<td>
						土地证复印件(土地自有)或土地租赁协议复印件及出租方土地证复印件（土地租赁）
					</td>
					<td>
						<html:text property="collectedDate6" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected6" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						7
					</td>
					<td>
						关于建设斯柯达4S店的城市规划及建筑法规的相关文件复印件
					</td>
					<td>
						<html:text property="collectedDate7" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected7" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						8
					</td>
					<td>
						建设用地或建筑的规划红线图及规划设计条件复印件
					</td>
					<td>
						<html:text property="collectedDate8" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected8" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						9
					</td>
					<td>
						申请方近三年的资产负债表（加盖公章）
					</td>
					<td>
						<html:text property="collectedDate9" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected9" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						10
					</td>
					<td>
						申请方近三年的损益表（加盖公章）
					</td>
					<td>
						<html:text property="collectedDate10" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected10" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						11
					</td>
					<td>
						申请方近三年的现金流量表（加盖公章）
					</td>
					<td>
						<html:text property="collectedDate11" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected11" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						12
					</td>
					<td>
						申请方近三年的年度审计报告（附审计机构资料）
					</td>
					<td>
						<html:text property="collectedDate12" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected12" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						13
					</td>
					<td>
						银行授信额度协议复印件
					</td>
					<td>
						<html:text property="collectedDate13" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected13" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td>
						14
					</td>
					<td>
						银行资信等级证明文件复印件
					</td>
					<td>
						<html:text property="collectedDate14" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected14" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-odd">
					<td>
						15
					</td>
					<td>
						申请城市地图（原件，须标注拟建斯柯达4S店位置）
					</td>
					<td>
						<html:text property="collectedDate15" styleClass="Wdate" onclick="WdatePicker()" />
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="collected15" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
			</table>
			<br />
			<div id="reviewPart" style="display:none;">
			<div class="site-title">
				审核结果
			</div>
			<table class="table-layout">
				<tr class="tr-odd">
					<td class="td-label">
						建设地址<span class="required">*</span>
					</td>
					<td>
						<html:text property="builtAddress" />
					</td>
				</tr>
				<tr class="tr-even">
					<td class="td-label">
						建设级别<span class="required">*</span>
					</td>
					<td>
						<html:text property="builtGrade" />
					</td>
				</tr>
				<tr class="tr-odd">
					<td class="td-label">
						建设经纬度<span class="required">*</span>
					</td>
					<td>
						经度：<html:text property="builtLongitude" /><p> 如：东经8度33分2秒 写为 8°33′2″E ,西经78度 写为 78°0′0″W</p>
						<br />
						纬度：<html:text property="builtLatitude" /><p> 如：北纬46度24分3秒 写为 46°24′3″N ,南纬55度15分6秒 写为 55°15′6″S</p>
					</td>
				</tr>
				<tr class="tr-even">
					<td class="td-label">
						资料上传
					</td>
					<td>
						<html:hidden property="attachId" styleId="attachId" />
						<html:file property="file" />
						<c:if test="${matReviewFormEx.attachId != null}">
						<span id="attachShow">
							已上传：<a href="<c:out value="${ctx}" /><common:attach name="matReviewFormEx" property="attachId" />">下载</a>
							<input type="button" value="删除" onclick="deleteAttach();" />
						</span>
						</c:if>
					</td>
				</tr>
				<tr class="tr-odd">
					<td class="td-label">
						是否通过<span class="required">*</span>
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="typeCode" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td class="td-label">
						备注
					</td>
					<td>
						<html:textarea property="notes" style="width:100%;" />
					</td>
				</tr>
			</table>
			<br />
			</div>
			<div class="center-opertion">
				<input type="button" value="提交" onclick="validate();" />
				<input type="button" onclick="history.back();" value="取消" />
			</div>
		</html:form>
	</div>
		<script>
function deleteAttach(){
	_g("attachId").value="";
	_g("attachShow").style.display="none";
}
function validate(){
	var f = _g("matReviewForm");
	var patternLongitude = /^((\d|[1-9]\d|1[0-7]\d)[°](\d|[0-5]\d)[′](\d|[0-5]\d)(\.\d{1,2})?[\″]?[E]|[W]$)|(180[°]0[′]0[\″]?[E]|[W]$)/;
	var patternLatitude = /^((\d|[1-8]\d)[°](\d|[0-5]\d)[′](\d|[0-5]\d)(\.\d{1,2})?[\″]?[N]|[S]$)|(90[°]0[′]0[\″]?[N]|[S]$)/;
	if(!patternLongitude.test($.trim($("input[type='text'][name='builtLongitude']").val()))) return alert("经度格式填写错误");
	if(!patternLatitude.test($.trim($("input[type='text'][name='builtLatitude']").val()))) return alert("纬度格式填写错误");
	for(var i = 1; i < 16; i++){
		var c = $("input[type='radio'][name='collected"+i+"']:checked");
		if(c.length > 0 && c.val() == "1" && $("input[type='text'][name='collectedDate"+i+"']").val() < 1){
			return alert("请填写第 "+i+" 项材料的确认时间");
		}
	}
	var t = $("input[type='radio'][name='typeCode']:checked");
	if(t.length < 1) return alert("请选择是否审批通过");
	if(t.val() == "0" && f.notes.value.length < 1){
		return alert("请填写备注");
	}
	f.submit();
}
function toggleReviewPart(){
	var is15itemsReady = true;
	for(var i = 1; i < 16; i++){
		if($("input[type='radio'][name='collected"+i+"']:checked").length < 1){
			is15itemsReady = false;
			break;
		}
	}
	if(is15itemsReady){
		_g("reviewPart").style.display = "";
	}
}
jQuery(document).ready(function(){
	toggleReviewPart();
	for(var i = 1; i < 16; i++){
		$("input[type='radio'][name='collected"+i+"']").bind("click",toggleReviewPart);
	}
});
		</script>
	</body>
</html>
